<%str_method = @station.id.nil? ?  'post' : 'put'%>
<%str_path = @station.id.nil? ? stations_path : station_path%>

<%= form_for(@station, :url=> str_path, :method=>str_method,:html=>{:id=>"form_station"}) do |f| %>
  <% if @station.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@promo.errors.count, "error") %> prohibited this station from being saved:</h2>

      <ul>
      <% @station.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

	<%= field_set_tag text="Información de la terminal", :class => "MiFieldSet1" do%>
		<div class="field">
		  <%= f.label "Ciudad" %><br />
		  <%= f.text_field :ciudad %>
		</div>
		<div class="field">
		  <%= f.label "Capacidad" %><br />
		  <%= f.text_field :capacidad, :class => "MiTextField1" %>
		</div>
		<div class="field">
		  <%= f.label "Latitud" %><br />
		  <%= f.text_field :latitud, :class => "MiTextField1" %>
		</div>
		<div class="field">
		  <%= f.label "Longitud" %><br />
		  <%= f.text_field :longitud, :class => "MiTextField1" %>
		</div>
		<div class="actions">
			<% if @station.id.nil? then %>
				<%= f.submit "Registrar", :class => "MiBoton1", :style => "margin-right: 5px; margin-bottom: 5px; padding-left: 0px; margin-top: 10px;" %>
			<% else %>
				<%= f.submit "Guardar", :class => "MiBoton1", :style => "margin-right: 5px; margin-bottom: 5px; padding-left: 0px; margin-top: 10px;" %>
			<% end %>
		</div>
	<% end %>

<% end %>
